/**
 * Copyright(C) 2019 xstgongyi.org
 * All rights reserved
 */
package org.xstgongyi.eduaid.dataobject;

import java.time.LocalDateTime;

/**
 * @author oldcrane
 * @created 2019-03-26
 */
public class SemesterDO implements java.io.Serializable {
	private static final long serialVersionUID = 1L;

	private Integer id;
	private String name;
	private Integer schoolYearId;
	private Boolean active;
	private LocalDateTime gmtCreated;
	private LocalDateTime gmtUpdated;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getSchoolYearId() {
		return schoolYearId;
	}

	public void setSchoolYearId(Integer schoolYearId) {
		this.schoolYearId = schoolYearId;
	}

	public Boolean getActive() {
		return active;
	}

	public void setActive(Boolean active) {
		this.active = active;
	}

	public LocalDateTime getGmtCreated() {
		return gmtCreated;
	}

	public void setGmtCreated(LocalDateTime gmtCreated) {
		this.gmtCreated = gmtCreated;
	}

	public LocalDateTime getGmtUpdated() {
		return gmtUpdated;
	}

	public void setGmtUpdated(LocalDateTime gmtUpdated) {
		this.gmtUpdated = gmtUpdated;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SemesterDO other = (SemesterDO) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "SemesterDO[id=" + id + ", name=" + name + ", active=" + active + ", schoolYearId=" + schoolYearId + "]";
	}

}
